package com.meteor.vo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import com.meteor.entity.Community;
import com.meteor.framework.common.utils.DateUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 *
 * @Description: 公告
 *
 * @author lynn
 * @date 2024/1/22
 */

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("pf_publicity")
public class PublicityVO implements Serializable, TransPojo {


    private String id;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "公告类型  1：公告  2：新闻")
    private Integer type;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "消息来源  1：内部  2：外部")
    private Integer messageSource;

    @Schema(description = "商户名称")
    private String merchantName;

    @Schema(description = "商户id")
    private String merchantId;

    @Schema(description = "组织id")
    private String orgId;

    @Schema(description = "组织名称")
    private String orgName;

    @Schema(description = "社区id")
    @Trans(type = TransType.SIMPLE, target = Community.class, fields = "communityName", ref = "communityName")
    private String communityId;

    @Schema(description = "社区名称")
    private String communityName;

    @Schema(description = "创建人")
    private String createdBy;

    @Schema(description = "创建者姓名")
    private String createdName;

    @Schema(description = "发布时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createTime;

    @Schema(description = "图片地址")
    private String image;

    @Schema(description = "图片url地址id")
    private List<String> urlIds;

    @Schema(description = "图片url")
    private List<String> imageUrls;

    @Schema(description = "是否推荐 1=推荐显示 2=不推荐")
    private Integer publicType;

}
